package Reeks5.VanRansbeeck.Kevin.Model.States.Player;

import Reeks5.VanRansbeeck.Kevin.Model.States.Game.SpelStateContext;
import java.util.logging.Level;
import java.util.logging.Logger;

public class FoldState implements PokerSpelerState {

    public String getStatus() {
        return "FOLDED";
    }

    public void fold(PlayerStateContext aThis, SpelStateContext spelstate) {
        try {
            throw new IllegalAccessException("Eens gefold - altijd gefold");
        } catch (IllegalAccessException ex) {
            Logger.getLogger(FoldState.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public void raise(PlayerStateContext aThis, SpelStateContext spelstate, int value) {
        try {
            throw new IllegalAccessException("Eens gefold - altijd gefold");
        } catch (IllegalAccessException ex) {
            Logger.getLogger(FoldState.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public void call(PlayerStateContext aThis, SpelStateContext spelstate, int value) {
        try {
            throw new IllegalAccessException("Eens gefold - altijd gefold");
        } catch (IllegalAccessException ex) {
            Logger.getLogger(FoldState.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public void allin(PlayerStateContext aThis, SpelStateContext spelstate, int value) {
        try {
            throw new IllegalAccessException("Eens gefold - altijd gefold");
        } catch (IllegalAccessException ex) {
            Logger.getLogger(FoldState.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public void check(PlayerStateContext aThis, SpelStateContext spelstate) {
        try {
            throw new IllegalAccessException("Eens gefold - altijd gefold");
        } catch (IllegalAccessException ex) {
            Logger.getLogger(FoldState.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public void reset(PlayerStateContext aThis, SpelStateContext spelstate) {
        // als er winnaar is
        aThis.setStatus(new NewState());
    }

    public void bet(PlayerStateContext aThis, SpelStateContext spelstate, int value) {
        try {
            throw new IllegalAccessException("Eens gefold - altijd gefold");
        } catch (IllegalAccessException ex) {
            Logger.getLogger(FoldState.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
    
}
